const SMTPServer = require("smtp-server").SMTPServer;
const server = new SMTPServer({
    secure: false,
    onData(stream, session, callback) {
        console.log("==onData===", address);
        return callback()
    },
    onRcptTo(address, session, callback) {
        console.log("==onRcptTo===", address);
        return callback()
    },
    onConnect(session, callback) {
        console.log("==onConnect===", session);
        return callback(); // Accept the connection
    },
});

server.on("error", (err) => {
    console.log("Error %s", err.message);
});

server.listen(25);
console.log("==server.listen===",);
